import type { App } from "vue"
import { createPinia } from "pinia"
import { useThemeStore } from "./modules/theme"
import { useAppStore } from "./modules/app"

const store = createPinia()

export function setupStore(app: App<Element>) {
    app.use(store)
    const themeStore = useThemeStore()
    const appStore = useAppStore()
    themeStore.setup()
    appStore.setup()
}

export { store }
